<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>保存企业认证审批管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/institutionauditinfo/institutionAuditInfo/">保存企业认证审批列表</a></li>
		<shiro:hasPermission name="institutionauditinfo:institutionAuditInfo:edit"><li><a href="${ctx}/institutionauditinfo/institutionAuditInfo/form">保存企业认证审批添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="institutionAuditInfo" action="${ctx}/institutionauditinfo/institutionAuditInfo/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>机构名称：</label><form:input path="institutionName" htmlEscape="false" maxlength="50" class="input-medium"/></li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>机构名称</th>
				<th>统一社会信用代码</th>
				<th>法人代表</th>
				<th>审核状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="institutionAuditInfo">
			<tr>
				<td>${institutionAuditInfo.institutionName}</td>
				<td>${institutionAuditInfo.uniformSocialCreditCode}</td>
				<td>${institutionAuditInfo.legalRepresentative}</td>
				<td>
					<c:choose>
                    <c:when test="${institutionAuditInfo.status== 'PENDING'}">
                    	等待审核
                     </c:when>
                     <c:when test="${institutionAuditInfo.status== 'CLOSE'}">
                    	审核通过
                     </c:when>
                     <c:when test="${institutionAuditInfo.status== 'REJECT'}">
                    	审核不通过
                     </c:when>
                     <c:otherwise>
                    </c:otherwise>
                	</c:choose>
				</td>
				<td>
    				<a href="${ctx}/institutionauditinfo/institutionAuditInfo/form?id=${institutionAuditInfo.id}">明细</a>
    				<c:choose>
                    <c:when test="${institutionAuditInfo.status== 'PENDING'}">
                    			<a href="${ctx}/institutionauditinfo/institutionAuditInfo/update/${institutionAuditInfo.id}/instutionId/${institutionAuditInfo.institutionId}/flag/CLOSE" onclick="return confirmx('确认要审核通过吗？', this.href)">通过</a>
								<a href="${ctx}/institutionauditinfo/institutionAuditInfo/update/${institutionAuditInfo.id}/instutionId/${institutionAuditInfo.institutionId}/flag/REJECT" onclick="return confirmx('确认要审核不通过吗？', this.href)">失败</a>
                     </c:when>
                     <c:otherwise>
                    </c:otherwise>
                	</c:choose>
				
				</td>
				
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>